<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gamvas.ParticleEmitter</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.51 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="gamvas.ParticleEmitter"></a>gamvas.<wbr>ParticleEmitter</h1><div class=CBody><h4 class=CHeading>Description</h4><p>A particle emitter</p><p>The particle emitter allows you to achive many special effects like smoke, fire, rain and similar.&nbsp; It can emitt images or animations.</p><p>The emitter extends the <a href="gamvas-actor-js.html#gamvas.Actor" class=LClass id=link37 onMouseOver="ShowTip(event, 'tt36', 'link37')" onMouseOut="HideTip('tt36')">gamvas.Actor</a> class and can therefor be added with <a href="gamvas-state-state-js.html#gamvas.State.addActor" class=LFunction id=link38 onMouseOver="ShowTip(event, 'tt37', 'link38')" onMouseOut="HideTip('tt37')">gamvas.State.addActor</a> for automatic drawing</p><h4 class=CHeading>Contructor</h4><p>new gamvas.ParticleEmitter(name, x, y, img, anim);</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>name</td><td class=CDLDescription>a unique name</td></tr><tr><td class=CDLEntry>x/y</td><td class=CDLDescription>the position of the emitter</td></tr><tr><td class=CDLEntry>img</td><td class=CDLDescription>a <a href="gamvas-image-js.html#gamvas.Image" class=LClass id=link39 onMouseOver="ShowTip(event, 'tt4', 'link39')" onMouseOut="HideTip('tt4')">gamvas.Image</a> or <a href="gamvas-animation-js.html#gamvas.Animation" class=LClass id=link40 onMouseOver="ShowTip(event, 'tt6', 'link40')" onMouseOut="HideTip('tt6')">gamvas.Animation</a> instance</td></tr><tr><td class=CDLEntry>anim</td><td class=CDLDescription>true/false, if img is a <a href="gamvas-animation-js.html#gamvas.Animation" class=LClass id=link41 onMouseOver="ShowTip(event, 'tt6', 'link41')" onMouseOut="HideTip('tt6')">gamvas.Animation</a> instead of <a href="gamvas-image-js.html#gamvas.Image" class=LClass id=link42 onMouseOver="ShowTip(event, 'tt4', 'link42')" onMouseOut="HideTip('tt4')">gamvas.Image</a></td></tr></table><h4 class=CHeading>Note</h4><p>The emitter provides a number of function named set{value} with a corresponding set{value}Range function.&nbsp; The range specifies a range of possible values around the non range value.&nbsp; This allows you to bring variance in the particle emission and therefor realism.</p><p>For example, you could use emitter.setParticleSpeed(150); with emitter.setParticleSpeedRange(50); This would end up with the particles being generated with speeds between 125 to 175 pixels per second.</p><h4 class=CHeading>Example</h4><blockquote><pre>myEmitter = gamvas.ParticleEmitter.extend({
    onParticleEnd: function(pos, rot, scale, vel) {
        concole.log('rest in peace, particle at '+pos.x+','+pos.y);
    }
});

myState = gamvas.State.extend({
   init: function() {
      var em = new myEmitter('smoke', 0, 0, new gamvas.Image(this.resource.getImage('smoke.png')));
      em.setParticleRate(20);
      em.setRotationRange(Math.PI*0.1);
      this.addActor(em);
   },
});</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#gamvas.ParticleEmitter" >gamvas.<wbr>ParticleEmitter</a></td><td class=SDescription>A particle emitter</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#gamvas.ParticleEmitter.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.name" >name</a></td><td class=SDescription>The name of the particle emitter</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.lifetime" >lifetime</a></td><td class=SDescription>The time the emitter is running</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.emitted" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">emitted</a></td><td class=SDescription>The amount of emitted particles</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.position" >position</a></td><td class=SDescription>A <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a> object with the position information</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.center" >center</a></td><td class=SDescription>A <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link3 onMouseOver="ShowTip(event, 'tt2', 'link3')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a> object with the center offset of the particle emitter</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.rotation" >rotation</a></td><td class=SDescription>The rotation of the particle emitter</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.scaleFactor" >scaleFactor</a></td><td class=SDescription>The scale factor of the object</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#gamvas.ParticleEmitter.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setImage" id=link4 onMouseOver="ShowTip(event, 'tt3', 'link4')" onMouseOut="HideTip('tt3')">setImage</a></td><td class=SDescription>Set a <a href="gamvas-image-js.html#gamvas.Image" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt4', 'link5')" onMouseOut="HideTip('tt4')">gamvas.Image</a> as Particle</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setAnimation" id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">setAnimation</a></td><td class=SDescription>Set a <a href="gamvas-animation-js.html#gamvas.Animation" class=LClass id=link7 onMouseOver="ShowTip(event, 'tt6', 'link7')" onMouseOut="HideTip('tt6')">gamvas.Animation</a> as Particle</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setAnimationLifeTime" id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">setAnimationLifeTime</a></td><td class=SDescription>Set if the animation should be played once for the lifetime</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setRotation" >setRotation</a></td><td class=SDescription>Set the rotation of the nozzle</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setRotationRange" id=link9 onMouseOver="ShowTip(event, 'tt8', 'link9')" onMouseOut="HideTip('tt8')">setRotationRange</a></td><td class=SDescription>Set the angle around rotation how particles are emitted from the nozzle</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleRate" id=link10 onMouseOver="ShowTip(event, 'tt9', 'link10')" onMouseOut="HideTip('tt9')">setParticleRate</a></td><td class=SDescription>Set the rate the particles are emitted</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.getParticleRate" id=link11 onMouseOver="ShowTip(event, 'tt10', 'link11')" onMouseOut="HideTip('tt10')">getParticleRate</a></td><td class=SDescription>Get the current particle emission rate</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleRateRange" id=link12 onMouseOver="ShowTip(event, 'tt11', 'link12')" onMouseOut="HideTip('tt11')">setParticleRateRange</a></td><td class=SDescription>Set the rate range particles are emitted</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleLimit" id=link13 onMouseOver="ShowTip(event, 'tt12', 'link13')" onMouseOut="HideTip('tt12')">setParticleLimit</a></td><td class=SDescription>Set the maximum number of particles that will be emitted</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.alignParticleToPath" id=link14 onMouseOver="ShowTip(event, 'tt13', 'link14')" onMouseOut="HideTip('tt13')">alignParticleToPath</a></td><td class=SDescription>If true, align particle orientation along their movement</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleRotation" id=link15 onMouseOver="ShowTip(event, 'tt14', 'link15')" onMouseOut="HideTip('tt14')">setParticleRotation</a></td><td class=SDescription>Set the particles starting rotation</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleRotationRange" id=link16 onMouseOver="ShowTip(event, 'tt15', 'link16')" onMouseOut="HideTip('tt15')">setParticleRotationRange</a></td><td class=SDescription>Set the range around particles starting rotation</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleRotationVelocity" id=link17 onMouseOver="ShowTip(event, 'tt16', 'link17')" onMouseOut="HideTip('tt16')">setParticleRotationVelocity</a></td><td class=SDescription>The rotational velocity of created particles</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleRotationVelocityRange" id=link18 onMouseOver="ShowTip(event, 'tt17', 'link18')" onMouseOut="HideTip('tt17')">setParticleRotationVelocityRange</a></td><td class=SDescription>The range of the rotational velocity</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleScale" id=link19 onMouseOver="ShowTip(event, 'tt18', 'link19')" onMouseOut="HideTip('tt18')">setParticleScale</a></td><td class=SDescription>Set the scale of newly created particles</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleScaleRange" id=link20 onMouseOver="ShowTip(event, 'tt19', 'link20')" onMouseOut="HideTip('tt19')">setParticleScaleRange</a></td><td class=SDescription>Set the range of scale</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleSpeed" id=link21 onMouseOver="ShowTip(event, 'tt20', 'link21')" onMouseOut="HideTip('tt20')">setParticleSpeed</a></td><td class=SDescription>Set the initial speed of created particles</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleSpeedRange" id=link22 onMouseOver="ShowTip(event, 'tt21', 'link22')" onMouseOut="HideTip('tt21')">setParticleSpeedRange</a></td><td class=SDescription>Set the range around the initial speed of created particles</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleLifeTime" id=link23 onMouseOver="ShowTip(event, 'tt22', 'link23')" onMouseOut="HideTip('tt22')">setParticleLifeTime</a></td><td class=SDescription>Set the lifetime of new particles</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleLifeTimeRange" id=link24 onMouseOver="ShowTip(event, 'tt23', 'link24')" onMouseOut="HideTip('tt23')">setParticleLifeTimeRange</a></td><td class=SDescription>Set the range around the lifetime of new particles</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleVelocityDamping" id=link25 onMouseOver="ShowTip(event, 'tt24', 'link25')" onMouseOut="HideTip('tt24')">setParticleVelocityDamping</a></td><td class=SDescription>Set how much the velocity is slowed down over time</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleVelocityDampingRange" id=link26 onMouseOver="ShowTip(event, 'tt25', 'link26')" onMouseOut="HideTip('tt25')">setParticleVelocityDampingRange</a></td><td class=SDescription>Set the range around velocity damping</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleRotationDamping" id=link27 onMouseOver="ShowTip(event, 'tt26', 'link27')" onMouseOut="HideTip('tt26')">setParticleRotationDamping</a></td><td class=SDescription>Set how much the rotation is slowed down over time</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleRotationDampingRange" id=link28 onMouseOver="ShowTip(event, 'tt27', 'link28')" onMouseOut="HideTip('tt27')">setParticleRotationDampingRange</a></td><td class=SDescription>Set range around the rotation damping</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setParticleStartPositionRange" id=link29 onMouseOver="ShowTip(event, 'tt28', 'link29')" onMouseOut="HideTip('tt28')">setParticleStartPositionRange</a></td><td class=SDescription>Sets the area where particles are created</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setGravity" id=link30 onMouseOver="ShowTip(event, 'tt29', 'link30')" onMouseOut="HideTip('tt29')">setGravity</a></td><td class=SDescription>Set the gravity that affects the particle emitter</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setScaleTable" id=link31 onMouseOver="ShowTip(event, 'tt30', 'link31')" onMouseOut="HideTip('tt30')">setScaleTable</a></td><td class=SDescription>Set the scale over lifetime</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.setAlphaTable" id=link32 onMouseOver="ShowTip(event, 'tt31', 'link32')" onMouseOut="HideTip('tt31')">setAlphaTable</a></td><td class=SDescription>Set the alpha (transparency) over lifetime</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setSpeedScaleTable" id=link33 onMouseOver="ShowTip(event, 'tt32', 'link33')" onMouseOut="HideTip('tt32')">setSpeedScaleTable</a></td><td class=SDescription>Set the scale depending on particle speed</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.draw" id=link34 onMouseOver="ShowTip(event, 'tt33', 'link34')" onMouseOut="HideTip('tt33')">draw</a></td><td class=SDescription>Draw the particle emitter</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.reset" id=link35 onMouseOver="ShowTip(event, 'tt34', 'link35')" onMouseOut="HideTip('tt34')">reset</a></td><td class=SDescription>Reset the particle emitter</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.onParticleEnd" id=link36 onMouseOver="ShowTip(event, 'tt35', 'link36')" onMouseOut="HideTip('tt35')">onParticleEnd</a></td><td class=SDescription>Overwrite this function to do something everytime a particle is removed</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setRotation" >setRotation</a></td><td class=SDescription>Set certain rotation of the particle emitter in radians</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.rotate" >rotate</a></td><td class=SDescription>Rotate the particle emitter</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setPosition" >setPosition</a></td><td class=SDescription>Set the position of a particle emitter</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.move" >move</a></td><td class=SDescription>Move the particle emitter</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.ParticleEmitter.setScale" >setScale</a></td><td class=SDescription>Set a certain scale factor</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.ParticleEmitter.scale" >scale</a></td><td class=SDescription>Scale a object</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.Variables"></a>Variables</h3></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.name"></a>name</h3><div class=CBody><p>The name of the particle emitter</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.lifetime"></a>lifetime</h3><div class=CBody><p>The time the emitter is running</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.emitted"></a>emitted</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.emitted</td></tr></table></blockquote><p>The amount of emitted particles</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.position"></a>position</h3><div class=CBody><p>A <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link43 onMouseOver="ShowTip(event, 'tt2', 'link43')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a> object with the position information</p><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.setPosition" class=LFunction id=link44 onMouseOver="ShowTip(event, 'tt38', 'link44')" onMouseOut="HideTip('tt38')">gamvas.ParticleEmitter.setPosition</a> <a href="#gamvas.ParticleEmitter.move" class=LFunction id=link45 onMouseOver="ShowTip(event, 'tt39', 'link45')" onMouseOut="HideTip('tt39')">gamvas.ParticleEmitter.move</a></p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.center"></a>center</h3><div class=CBody><p>A <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link46 onMouseOver="ShowTip(event, 'tt2', 'link46')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a> object with the center offset of the particle emitter</p><h4 class=CHeading>See</h4><p>&lt;gamvas.ParticleEmitter.setCenter&gt;</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.rotation"></a>rotation</h3><div class=CBody><p>The rotation of the particle emitter</p><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.setRotation" class=LFunction id=link47 onMouseOver="ShowTip(event, 'tt40', 'link47')" onMouseOut="HideTip('tt40')">gamvas.ParticleEmitter.setRotation</a> <a href="#gamvas.ParticleEmitter.rotate" class=LFunction id=link48 onMouseOver="ShowTip(event, 'tt41', 'link48')" onMouseOut="HideTip('tt41')">gamvas.ParticleEmitter.rotate</a></p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.scaleFactor"></a>scaleFactor</h3><div class=CBody><p>The scale factor of the object</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setImage"></a>setImage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setImage: function(</td><td class="PParameter  prettyprint " nowrap>img</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set a <a href="gamvas-image-js.html#gamvas.Image" class=LClass id=link49 onMouseOver="ShowTip(event, 'tt4', 'link49')" onMouseOut="HideTip('tt4')">gamvas.Image</a> as Particle</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setAnimation"></a>setAnimation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setAnimation: function(</td><td class="PParameter  prettyprint " nowrap>anim</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set a <a href="gamvas-animation-js.html#gamvas.Animation" class=LClass id=link50 onMouseOver="ShowTip(event, 'tt6', 'link50')" onMouseOut="HideTip('tt6')">gamvas.Animation</a> as Particle</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setAnimationLifeTime"></a>setAnimationLifeTime</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setAnimationLifeTime: function(</td><td class="PParameter  prettyprint " nowrap>yesno</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set if the animation should be played once for the lifetime</p><p>If set to true, the Animation plays once from start to end until the particle dies, otherwise the animation plays with whatever it has set as FPS</p><h4 class=CHeading>Paramters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>yesno</td><td class=CDLDescription>true/false, true = play once over lifetime, false = play as specified by FPS</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setRotation"></a>setRotation</h3><div class=CBody><h4 class=CHeading>Description</h4><p>Set the rotation of the nozzle</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the rotation in radians</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setRotationRange"></a>setRotationRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setRotationRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the angle around rotation how particles are emitted from the nozzle</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the range around the center (half plus, half minus)</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleRate"></a>setParticleRate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRate: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the rate the particles are emitted</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the rate in particles per second</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.getParticleRate"></a>getParticleRate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">getParticleRate: function()</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Get the current particle emission rate</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleRateRange"></a>setParticleRateRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRateRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the rate range particles are emitted</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the range around the center (half plus, half minus)</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleLimit"></a>setParticleLimit</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleLimit: function(</td><td class="PParameter  prettyprint " nowrap>l</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the maximum number of particles that will be emitted</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>l</td><td class=CDLDescription>the particle limit</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.alignParticleToPath"></a>alignParticleToPath</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>alignParticleToPath: function(</td><td class="PParameter  prettyprint " nowrap>yesno</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>If true, align particle orientation along their movement</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>yesno</td><td class=CDLDescription>true/false if to set the particle orientation along its path</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleRotation"></a>setParticleRotation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotation: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the particles starting rotation</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the rotation in radians</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleRotationRange"></a>setParticleRotationRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the range around particles starting rotation</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the range of variance around the particles rotation</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleRotationVelocity"></a>setParticleRotationVelocity</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationVelocity: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>The rotational velocity of created particles</p><p>Defines how much they continue to rotate while moving</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the rotational velocity in radians per second</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleRotationVelocityRange"></a>setParticleRotationVelocityRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationVelocityRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>The range of the rotational velocity</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the range around the rotational velocity in radians per second</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleScale"></a>setParticleScale</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleScale: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the scale of newly created particles</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the scale factor (1 = original, &lt; 1 = smaller, &gt; 1 = bigger)</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleScaleRange"></a>setParticleScaleRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleScaleRange: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the range of scale</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the range around the scale factor</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleSpeed"></a>setParticleSpeed</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleSpeed: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the initial speed of created particles</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the speed in pixels per second</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleSpeedRange"></a>setParticleSpeedRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleSpeedRange: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the range around the initial speed of created particles</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the range around the speed in pixels per second</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleLifeTime"></a>setParticleLifeTime</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleLifeTime: function(</td><td class="PParameter  prettyprint " nowrap>l</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the lifetime of new particles</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>l</td><td class=CDLDescription>the lifetime in seconds</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleLifeTimeRange"></a>setParticleLifeTimeRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleLifeTimeRange: function(</td><td class="PParameter  prettyprint " nowrap>l</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the range around the lifetime of new particles</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>l</td><td class=CDLDescription>the range around the lifetime in seconds</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleVelocityDamping"></a>setParticleVelocityDamping</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleVelocityDamping: function(</td><td class="PParameter  prettyprint " nowrap>v</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set how much the velocity is slowed down over time</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>v</td><td class=CDLDescription>the damping value, between 0 (none) and 1 (immediate stop)</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleVelocityDampingRange"></a>setParticleVelocityDampingRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleVelocityDampingRange: function(</td><td class="PParameter  prettyprint " nowrap>v</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the range around velocity damping</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>v</td><td class=CDLDescription>the velocity damping range</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleRotationDamping"></a>setParticleRotationDamping</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationDamping: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set how much the rotation is slowed down over time</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the damping value, between 0 (none) and 1 (immediate stop)</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleRotationDampingRange"></a>setParticleRotationDampingRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationDampingRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set range around the rotation damping</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the range around the rotation damping</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setParticleStartPositionRange"></a>setParticleStartPositionRange</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleStartPositionRange: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Sets the area where particles are created</p><p>By default every particle is created exactly at the position of the particle emitter, by setting a start position range, you can define a rectangle where the particles are created</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the starting position range as <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link51 onMouseOver="ShowTip(event, 'tt2', 'link51')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a></td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setGravity"></a>setGravity</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setGravity: function(</td><td class="PParameter  prettyprint " nowrap>g</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the gravity that affects the particle emitter</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the gravity in pixels per second as <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link52 onMouseOver="ShowTip(event, 'tt2', 'link52')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a></td></tr></table><h4 class=CHeading>Note</h4><p>Gravity is in pixels per second, other then in real life, if you want your particles to fall down, you specify a positive Y value</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setScaleTable"></a>setScaleTable</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setScaleTable: function(</td><td class="PParameter  prettyprint " nowrap>scaleTable</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the scale over lifetime</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>scaleTable</td><td class=CDLDescription>a array with scale factors over the particles lifetime</td></tr></table><h4 class=CHeading>The array has to be made the following way</h4><p>It has a index (first value) between 0 and 1 where 0 is when the particle is created and 1 is when it is destroyed.&nbsp; You can add values between them feely, but you have to ensure, that there is a 0 and 1 index.</p><p>The following would be a table that scales from 0 to original size at the half, and then back to 0 at end:</p><blockquote><pre>[ [0, 0], [0.5, 1], [1, 0] ]</pre></blockquote><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.setSpeedScaleTable" class=LFunction id=link53 onMouseOver="ShowTip(event, 'tt32', 'link53')" onMouseOut="HideTip('tt32')">gamvas.ParticleEmitter.setSpeedScaleTable</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setAlphaTable"></a>setAlphaTable</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setAlphaTable: function(</td><td class="PParameter  prettyprint " nowrap>alphaTable</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the alpha (transparency) over lifetime</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>alphaTable</td><td class=CDLDescription>a array with alpha values over the particles lifetime</td></tr></table><h4 class=CHeading>The array has to be made the following way</h4><p>It has a index (first value) between 0 and 1 where 0 is when the particle is created and 1 is when it is destroyed.&nbsp; You can add values between them feely, but you have to ensure, that there is a 0 and 1 index.</p><p>The following would be a table that alpha from 0 to original size, then quite early it gets full opacity, and then fades out slowly to the end:</p><blockquote><pre>[ [0, 0], [0.1, 1], [1, 0] ]</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setSpeedScaleTable"></a>setSpeedScaleTable</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setSpeedScaleTable: function(</td><td class="PParameter  prettyprint " nowrap>spdScaleTable</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the scale depending on particle speed</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>spdScaleTable</td><td class=CDLDescription>a array with scale factors for x/y depending on particle speed</td></tr></table><h4 class=CHeading>The array has to be made the following way</h4><p>It has a index (first value) which is the speed of the particle in pixels per second, you should have at least a speed of 0 and some speed bigger then 0</p><p>Following the index, there are two values representing the x and y scale factor where 1 is original size, smaller then 1 is smaller and higher then 1 is bigger</p><p>The following would be a table that scales the particle very small when it is slow, then when moving at medium speed, it scales it to original size, wen moving fast it streches it by reducing the x scale and significantly increasing the y scale.</p><blockquote><pre>[ [0, 0.1, 0.1], [30, 1, 1], [100, 0.2, 3] ]</pre></blockquote><h4 class=CHeading>Note</h4><p>This is usually used with <a href="#gamvas.ParticleEmitter.alignParticleToPath" class=LFunction id=link54 onMouseOver="ShowTip(event, 'tt13', 'link54')" onMouseOut="HideTip('tt13')">gamvas.ParticleEmitter.alignParticleToPath</a>, as x and y are regarding to the particles original orientation</p><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.setScaleTable" class=LFunction id=link55 onMouseOver="ShowTip(event, 'tt30', 'link55')" onMouseOut="HideTip('tt30')">gamvas.ParticleEmitter.setScaleTable</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.draw"></a>draw</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>draw: function(</td><td class="PParameter  prettyprint " nowrap>t</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Draw the particle emitter</p><h4 class=CHeading>Paramters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>t</td><td class=CDLDescription>the time since last redraw in seconds</td></tr></table><h4 class=CHeading>Note</h4><p>Particle emitter extends <a href="gamvas-actor-js.html#gamvas.Actor" class=LClass id=link56 onMouseOver="ShowTip(event, 'tt36', 'link56')" onMouseOut="HideTip('tt36')">gamvas.Actor</a> and therefor can be added via <a href="gamvas-state-state-js.html#gamvas.State.addActor" class=LFunction id=link57 onMouseOver="ShowTip(event, 'tt37', 'link57')" onMouseOut="HideTip('tt37')">gamvas.State.addActor</a> for automatic drawing</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.reset"></a>reset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>reset: function(</td><td class="PParameter  prettyprint " nowrap>kill</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Reset the particle emitter</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>kill</td><td class=CDLDescription>true/false if old particles should be destroyed (optional)</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.onParticleEnd"></a>onParticleEnd</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>onParticleEnd: function(</td><td class="PParameter  prettyprint " nowrap>pos,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>rot,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>scale,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>vel</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Overwrite this function to do something everytime a particle is removed</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>pos</td><td class=CDLDescription>the position of the destroyed particle as <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link58 onMouseOver="ShowTip(event, 'tt2', 'link58')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a></td></tr><tr><td class=CDLEntry>rot</td><td class=CDLDescription>the rotation in radians</td></tr><tr><td class=CDLEntry>scale</td><td class=CDLDescription>the scale of the particle</td></tr><tr><td class=CDLEntry>vel</td><td class=CDLDescription>the velocity of the particle as <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link59 onMouseOver="ShowTip(event, 'tt2', 'link59')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a></td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setRotation"></a>setRotation</h3><div class=CBody><h4 class=CHeading>Description</h4><p>Set certain rotation of the particle emitter in radians</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the rotation in radians</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.rotate" class=LFunction id=link60 onMouseOver="ShowTip(event, 'tt41', 'link60')" onMouseOut="HideTip('tt41')">gamvas.ParticleEmitter.rotate</a> <a href="http://en.wikipedia.org/wiki/Radians" class=LURL target=_top>http://en.wikipedia.org/wiki/Radians</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.rotate"></a>rotate</h3><div class=CBody><h4 class=CHeading>Description</h4><p>Rotate the particle emitter</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the amount to rotate the particle emitter in radians</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.setRotation" class=LFunction id=link61 onMouseOver="ShowTip(event, 'tt40', 'link61')" onMouseOut="HideTip('tt40')">gamvas.ParticleEmitter.setRotation</a> <a href="http://en.wikipedia.org/wiki/Radians" class=LURL target=_top>http://en.wikipedia.org/wiki/Radians</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setPosition"></a>setPosition</h3><div class=CBody><h4 class=CHeading>Description</h4><p>Set the position of a particle emitter</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x/y</td><td class=CDLDescription>the position of the particle emitter in pixels</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.move" class=LFunction id=link62 onMouseOver="ShowTip(event, 'tt39', 'link62')" onMouseOut="HideTip('tt39')">gamvas.ParticleEmitter.move</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.move"></a>move</h3><div class=CBody><h4 class=CHeading>Description</h4><p>Move the particle emitter</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x/y</td><td class=CDLDescription>the pixels to move the particle emitter</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.setPosition" class=LFunction id=link63 onMouseOver="ShowTip(event, 'tt38', 'link63')" onMouseOut="HideTip('tt38')">gamvas.ParticleEmitter.setPosition</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.setScale"></a>setScale</h3><div class=CBody><h4 class=CHeading>Description</h4><p>Set a certain scale factor</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the scale value (1 = no scale, &lt; 1 = smaller, &gt; 1 = bigger)</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.scale" class=LFunction id=link64 onMouseOver="ShowTip(event, 'tt42', 'link64')" onMouseOut="HideTip('tt42')">gamvas.ParticleEmitter.scale</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.ParticleEmitter.scale"></a>scale</h3><div class=CBody><h4 class=CHeading>Description</h4><p>Scale a object</p><h4 class=CHeading>Note</h4><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the scale factor (&lt; 0 = shrink, &gt; 0 = enlarge)</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.ParticleEmitter.setScale" class=LFunction id=link65 onMouseOver="ShowTip(event, 'tt43', 'link65')" onMouseOut="HideTip('tt43')">gamvas.ParticleEmitter.setScale</a></p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MEntry><div class=MFile><a href="gamvas-base-js.html">gamvas</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-actor-js.html">gamvas.<wbr>Actor</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-actorstate-js.html">gamvas.<wbr>ActorState</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-animation-js.html">gamvas.<wbr>Animation</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astar-js.html">gamvas.<wbr>AStar</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astargrid-js.html">gamvas.<wbr>AStarGrid</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astargridnode-js.html">gamvas.<wbr>AStarGridNode</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astarmap-js.html">gamvas.<wbr>AStarMap</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astarnode-js.html">gamvas.<wbr>AStarNode</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-camera-js.html">gamvas.<wbr>Camera</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-class-js.html">gamvas.<wbr>Class</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-config-js.html">gamvas.<wbr>config</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-dom-js.html">gamvas.dom</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-event-js.html">gamvas.<wbr>event</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-image-js.html">gamvas.<wbr>Image</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-key-js.html">gamvas.key</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-math-js.html">gamvas.math</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-mouse-js.html">gamvas.<wbr>mouse</a></div></div><div class=MEntry><div class=MFile id=MSelected>gamvas.<wbr>ParticleEmitter</div></div><div class=MEntry><div class=MFile><a href="gamvas-physics-js.html">gamvas.<wbr>physics</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-physics-userdata-js.html">gamvas.<wbr>physics.<wbr>UserData</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-rect-js.html">gamvas.Rect</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-resource-js.html">gamvas.<wbr>Resource</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-screen-js.html">gamvas.<wbr>screen</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-sound-js.html">gamvas.<wbr>Sound</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-state-js.html">gamvas.<wbr>state</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-state-state-js.html">gamvas.<wbr>State</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-timer-js.html">gamvas.<wbr>timer</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-vector2d-js.html">gamvas.<wbr>Vector2D</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Macros.html">Macros</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Functions">Functions</option><option value="Macros">Macros</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([], 2);// --></script></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.emitted</td></tr></table></blockquote>The amount of emitted particles</div></div><div class=CToolTip id="tt2"><div class=CClass>A 2D vector class</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setImage: function(</td><td class="PParameter  prettyprint " nowrap>img</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set a gamvas.Image as Particle</div></div><div class=CToolTip id="tt4"><div class=CClass>A plain image with methods to move, rotate and zoom.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setAnimation: function(</td><td class="PParameter  prettyprint " nowrap>anim</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set a gamvas.Animation as Particle</div></div><div class=CToolTip id="tt6"><div class=CClass>Class for animated sprites</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setAnimationLifeTime: function(</td><td class="PParameter  prettyprint " nowrap>yesno</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set if the animation should be played once for the lifetime</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setRotationRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the angle around rotation how particles are emitted from the nozzle</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRate: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the rate the particles are emitted</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">getParticleRate: function()</td></tr></table></blockquote>Get the current particle emission rate</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRateRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the rate range particles are emitted</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleLimit: function(</td><td class="PParameter  prettyprint " nowrap>l</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the maximum number of particles that will be emitted</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>alignParticleToPath: function(</td><td class="PParameter  prettyprint " nowrap>yesno</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>If true, align particle orientation along their movement</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotation: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the particles starting rotation</div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the range around particles starting rotation</div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationVelocity: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>The rotational velocity of created particles</div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationVelocityRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>The range of the rotational velocity</div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleScale: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the scale of newly created particles</div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleScaleRange: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the range of scale</div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleSpeed: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the initial speed of created particles</div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleSpeedRange: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the range around the initial speed of created particles</div></div><div class=CToolTip id="tt22"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleLifeTime: function(</td><td class="PParameter  prettyprint " nowrap>l</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the lifetime of new particles</div></div><div class=CToolTip id="tt23"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleLifeTimeRange: function(</td><td class="PParameter  prettyprint " nowrap>l</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the range around the lifetime of new particles</div></div><div class=CToolTip id="tt24"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleVelocityDamping: function(</td><td class="PParameter  prettyprint " nowrap>v</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set how much the velocity is slowed down over time</div></div><div class=CToolTip id="tt25"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleVelocityDampingRange: function(</td><td class="PParameter  prettyprint " nowrap>v</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the range around velocity damping</div></div><div class=CToolTip id="tt26"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationDamping: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set how much the rotation is slowed down over time</div></div><div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleRotationDampingRange: function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set range around the rotation damping</div></div><div class=CToolTip id="tt28"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setParticleStartPositionRange: function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Sets the area where particles are created</div></div><div class=CToolTip id="tt29"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setGravity: function(</td><td class="PParameter  prettyprint " nowrap>g</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the gravity that affects the particle emitter</div></div><div class=CToolTip id="tt30"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setScaleTable: function(</td><td class="PParameter  prettyprint " nowrap>scaleTable</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the scale over lifetime</div></div><div class=CToolTip id="tt31"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setAlphaTable: function(</td><td class="PParameter  prettyprint " nowrap>alphaTable</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the alpha (transparency) over lifetime</div></div><div class=CToolTip id="tt32"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>setSpeedScaleTable: function(</td><td class="PParameter  prettyprint " nowrap>spdScaleTable</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the scale depending on particle speed</div></div><div class=CToolTip id="tt33"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>draw: function(</td><td class="PParameter  prettyprint " nowrap>t</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Draw the particle emitter</div></div><div class=CToolTip id="tt34"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>reset: function(</td><td class="PParameter  prettyprint " nowrap>kill</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Reset the particle emitter</div></div><div class=CToolTip id="tt35"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>onParticleEnd: function(</td><td class="PParameter  prettyprint " nowrap>pos,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>rot,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>scale,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>vel</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Overwrite this function to do something everytime a particle is removed</div></div><div class=CToolTip id="tt36"><div class=CClass>The actor class is the most important class in gamvas. </div></div><div class=CToolTip id="tt37"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>addActor: function(</td><td class="PParameter  prettyprint " nowrap>act</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Add a gamvas.Actor to the state. </div></div><div class=CToolTip id="tt38"><div class=CFunction>Set the position of a particle emitter</div></div><div class=CToolTip id="tt39"><div class=CFunction>Move the particle emitter</div></div><div class=CToolTip id="tt40"><div class=CFunction>Set the rotation of the nozzle</div></div><div class=CToolTip id="tt41"><div class=CFunction>Rotate the particle emitter</div></div><div class=CToolTip id="tt42"><div class=CFunction>Scale a object</div></div><div class=CToolTip id="tt43"><div class=CFunction>Set a certain scale factor</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>